package com.woniu.bh.beautysalon.web.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.bh.beautysalon.model.dto.*;
import com.woniu.bh.beautysalon.model.params.ArrangeTechnicianParam;
import com.woniu.bh.common.core.domain.technician.Technician;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author cxb
 * @since 2020-10-13
 */
public interface ITechnicianService extends IService<Technician> {
    /**
     * @description: 美容师服务排行榜
     * @param: beautysalonId
     * @return: java.util.List<com.woniu.project.beautysalon.dto.TechnicianRankDto>
     */
    List<TechnicianRankDto> technicianRank(Integer beautysalonId);

    /**
     * @description: 分页条件查询所有美容师
     * @param: pageIndex
     * @param: pageSize
     * @param: technicianSex
     * @param: beforeAge
     * @param: afterAge
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.woniu.project.beautysalon.dto.AllTechniciansDto>
     */
    IPage<AllTechniciansDto> pageQuery(Integer pageIndex, Integer pageSize, String technicianName, String technicianSex, Integer beforeAge, Integer afterAge);

    /**
     * @description: 美容师详情
     * @param: technicianId
     * @return: com.woniu.bh.beautysalon.model.dto.TechnicianDetail
     */
    TechnicianDetailDto getOneTechnician(Integer technicianId);

    /**
     * @description: 新增请求数据
     * @param: beautysalonId
     * @param: technicianId
     * @return: int
     */
    int signTechnician(Integer beautysalonId, Integer technicianId);

    /**
     * @description: 查询已签约美容师
     * @param: pageIndex
     * @param: pageSize
     * @param: beautysalonId
     * @param: technicianUsername
     * @param: beforeAge
     * @param: afterAge
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.woniu.bh.beautysalon.model.dto.AllTechniciansDto>
     */
    IPage<AllTechniciansDto> getAllSignedTechnicians(Integer pageIndex, Integer pageSize, Integer beautysalonId, String technicianName, String technicianSex, Integer beforeAge, Integer afterAge);

    /**
     * @description: 解约
     * @param: technicianId
     * @return: int
     */
    int termination(Integer technicianId);

    /**
     * @description: 分页查询所有审核的美容师
     * @param: pageIndex
     * @param: pageSize
     * @param: beautysalonId
     * @return: com.baomidou.mybatisplus.core.metadata.IPage
     */
    IPage<CheckDto> getAllCheck(Integer pageIndex, Integer pageSize, Integer beautysalonId);

    /**
     * @description: 安排美容师
     * @param: orderId
     * @param: technicianId
     * @param: beautysalonId
     * @return: void
     */
    void arrangeTechnician(ArrangeTechnicianParam arrangeTechnicianParam);

    /**
     * @description: 一个审核美容师详情
     * @param: checkId
     * @return: com.woniu.bh.beautysalon.model.dto.TechnicianCheckDetailDto
     */
    TechnicianCheckDetailDto getOneCheck(Integer checkId);

    /**
     * @description: 通过审核
     * @param: checkId
     * @param: message
     * @param: beautysalonId
     * @return: void
     */
    int sendOkMsg(Integer checkId, String message, Integer beautysalonId);

    /**
     * @description: 拒绝
     * @param: checkId
     * @param: message
     * @param: beautysalonId
     * @return: int
     */
    int sendNoMsg(Integer checkId, String message, Integer beautysalonId);


}
